import Vue from 'vue'
import Router from 'vue-router'
import hotCourse from '@/components/salonNav'
import salonContent from "@/components/enSalon"
import userInfo from '@/components/userInfo'
import identity from '@/components/identity'
import setup from '@/components/setup'
import collection from '@/components/collection'
import feedback from '@/components/feedback'
import home from '@/components/index'
import movie from '@/components/movie'
import ecIndex from '../components/eng-corner/ec-index'
import ecFriend from '../components/eng-corner/ec-friends'
import ecGroupTip from '../components/eng-corner/group-tip'
import ecChat from '../components/eng-corner/ec-chat'
import subDetail from '../components/eng-corner/sub-detail'
import searchBox from '../components/eng-corner/search-index'
import courseNav from './../components/courseNav'
import Content from './../components/Content'
import Contenttwo from './../components/Contenttwo'
import datail from './../components/datail'
import guide from '@/components/guide'
import Enconer from '@/components/Enconer'
import translateGuide from '@/components/translateGuide'
import speak from '@/components/speak'
import loginAndReg from '@/components/loginAndReg'
import login from '@/components/login'
import register from '@/components/register'
import common from '@/components/common'
import translate from '@/components/Translate'
import guideSwipe from "@/components/swipe"
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: guideSwipe
    },
    {
      path: '/guide',
      name: 'guide',
      component: guideSwipe
      //children:[{
      //  path: '/guide/translate-guide',
      //  name: 'translate-guide',
      //  component: translateGuide
      //},
      //  {
      //    path: '/guide/Enconer',
      //    name: 'Enconer',
      //    component: Enconer
      //  },
      //  {
      //    path: '/guide/speak',
      //    name: 'speak',
      //    component: speak
      //  }]
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },{
      path: '/register',
      name: 'register',
      component: register
    },
    {
      path: '/loginAndReg',
      name: 'loginAndReg',
      component: loginAndReg
    },
    {
      path: '/common',
      name: 'common',
      component: common,
      children:[
        {
          path: '/common/home',
          name: 'home',
          component: home
        },

        {
          path:'/common/movie',
          name: 'movie',
          component: movie
        },
        {
          path: '/common/english',
          name: 'english',
          component: ecIndex
        },
        {
          path: '/common/translate',
          name: 'translate',
          component: translate
        },
        {
          path: '/common/personal',
          name: 'personal',
          component: userInfo
        },
        {
          path: '/common/hot-course',
          name: 'hot-course',
          component: hotCourse,
          children:[{
            path:'/common/hot-course/hotCourseList',
            name:'hotCourseList',
            component:salonContent
          }]
        },
        {
          path: '/common/courseNav',
          name: 'courseNav',
          component: courseNav,
          children:[
            {
              path: '/common/courseNav/Content',
              name: 'Content',
              component: Content
            },
            {
              path: '/common/courseNav/Contenttwo',
              name: 'Contenttwo',
              component: Contenttwo
            }
          ]
        },
        {
          path: '/common/datail',
          name: 'datail',
          component: datail
        },
        {
          path: '/common/identity',
          name: 'identity',
          component: identity
        },
        {
          path: '/common/setup',
          name: 'setup',
          component: setup
        },
        {
          path: '/common/collection',
          name: 'collection',
          component: collection
        },
        {
          path: '/common/feedback',
          name: 'feedback',
          component: feedback
        },
        {
          path:'/common/ecFriend',
          name:'ecFriend',
          component:ecFriend,
          children:[
            {
              path:'/common/ecFriend/ecGroupTip',
              name:'ecGroupTip',
              component:ecGroupTip
            }
          ]
        },
        {
          path:'/common/ecChat',
          name:'ecChat',
          component:ecChat
        },
        {
          path:'/common/subDetail',
          name:'subDetail',
          component:subDetail
        },
        {
          path:'/common/searchBox',
          name:'searchBox',
          component:searchBox
        }
      ]
    }
  ]
})
